package com.huarui.purchaseOrder.dao;

import java.util.List;
import java.util.Map;

import org.ewaf.framework.dao.IBaseDao;

import com.huarui.purchaseOrder.model.PurOrSaleOrder;

public interface IPurchaseOrderDao extends IBaseDao {
	
	@SuppressWarnings("unchecked")
	List<Map<String, Object>> getOrdersByCondition(Map map);

	@SuppressWarnings("unchecked")
	public Integer getOrdersCountByCondition(Map map);
	
	@SuppressWarnings("unchecked")
	public Map getOrderByIdJson(Integer id);
	
	@SuppressWarnings("unchecked")
	boolean updatePurCurrentorIdById(Map map);
	
	/**
	 * 根据主键加载订单
	 * @param map
	 * @return
	 */
	public Map<String, Object> getPurchaseById(Map<String, Object> map);
	
	/**
	 * 高级查询时的总数量
	 * @param paramsMap
	 * @return
	 */
//	public Integer getPurchaseNumByComplex(Map<String, Object> paramsMap);
	
	/**
	 * 高级查询分页数据集
	 * @param map
	 * @return
	 */
//	public List<Map<String, Object>> getPurChaseListByComplex(Map<String, Object> map);
	
	/**
	 * 
	 * @param buyId
	 * @return
	 */
//	public Integer getPursNumByBuyer(Integer buyId);
	
	/**
	 * 概要浏览总数量查询
	 * @param map
	 * @return
	 */
	public Integer getPurchaseOrderListCountByComplex(Map<String, Object> map);
	
	/**
	 * 概要浏览查询
	 * @param map
	 * @return
	 */
	public List<Map<String, Object>> getPurchaseOrderListByComplex(Map<String, Object> map);
	
	/**
	 * 更改当前处理人
	 * @param order
	 * @return
	 */
	public boolean updatePurCurrenterId(Map<String, Object> paramsMap);
	
	/**
	 * 处理销售订单
	 * @param paramsMap
	 * @return
	 */
	public boolean takeOverSaleOrder(Map<String, Object> paramsMap);
	
	/**
	 * 退回销售订单
	 * @param paramsMap
	 * @return
	 */
	public boolean turnBackSaleOrder(Map<String, Object> paramsMap);
	
	/**
	 * 更改状态
	 * @param paramsMap
	 * @return
	 */
	public boolean updateStatus(Map<String, Object> paramsMap);

	public boolean updateOrdersStatusAndReceiveOrSaleId(Map<String, Object> map);
}
